Programming Languages Section

Common Lisp Programming Language

What is Common Lisp Programming Language
Post by Amina Delali, February 28th, 2023

Some Facts

Common Lisp programming language, is a Lisp dialect that came after maclisp, that also combines and extends the features of the derived maclisp's dialects.

Common lisp is a multi paradigm language. It is procedural, functional, and object oriented. It is a high performance compiled language, fast and programmable, that allows the modification and the debugging of running applications.

Common lisp has free and commercial implementations. One of the free implementations, these two open source compilers:

  • Clozure CL (CCL) : with fast compilation speed, native threads, and command line development environment. To learn more about the compiler, you can check the official page.
  • Steel Bank Common Lisp (SBCL): it also comes with several features. For example the interactive environment that includes many extensions. To learn more about this compiler, you can check its official page.

Common lisp is a general purpose programming language, but because its flexible runtime environment, it can be used for server side development and long running software.

There are several applications written in common lisp. For example, there is the grammar and spell checker Grammarly, the flight search engine Matrix, and the rails scheduling system SISCOG’s



How to install it

  • on Windows:

    To install Common Lisp on Windows, we will simply use the multiplatform IDE Portacle, it comes with the SBCL compiler, and the Quick Lisp package manager, among other utilities.

    Just got to the Portacle website, and click on the latest release button to download the IDE.

    It will be an archive to extract to a folder that you mustn't move if you want you continue working with Portacle. To launch it just double-click on the portacle.exe file.

    It will run the Emacs IDE configured with SLIME mode for Common Lisp development.

  • on ubuntu :

    Same thing here, you just download Portacle from the official page, and run it. So to run it, you can right click on the portacle.desktop file then click on run as a program. If it doesn't work, go to the lin (from the extracted archive of course), then the launcher folder, and double click on Portacle.

The Hello World Example

We will use Portacle repl to run a simple Hello Wolrd code:

  • Open portacle, and wait for slime to load.
  • Write on the Slime REPL buffer window this code: (print "Hello World!")
  • Hit Enter.

Now, if you want to write your code to a file, compile it, and test it. Here it is what you can do:

  • Open Portacle, and wait fro slime to load.
  • Hit the CTRL x CTRL f commands, then type in hello.lisp
  • Write the following code on the buffer associated to the new created file:

    (defun hello ()
      (print "Hello World!"))

  • To compile the file, click on SLIME from the main menu, compilation, then compile file. Click on 'yes' to save the file. Or you can simply type: CTRL c ALT k. If it asks you to save the file, type y
  • Now, in the slime repl type: (hello ) Don't forget the space between hello and the closing parenthesis. If the slime buffer was closed, just click on Buffers from the main menu, then click on * slime-repl sbcl* *



Additional Information

For more information about the Common Lisp language and the corresponding code, you can check the following pages:

Something to say ?

If you want to add something about the language or about this post, please feel free to do it by commenting below 🙂 .